Adwaita: vertically linked entries fix.
authorLapo Calamandrei <calamandrei@gmail.com>
Wed, 22 Apr 2015 14:09:29 +0000 (16:09 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Wed, 22 Apr 2015 14:09:29 +0000 (16:09 +0200)
I was axing the edge hilight on the last linked entry which needs
to be there, fixed.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 64798a7e46af5065460384ed0b61cab15ea9b808..3cdd06ab6a16e3325807c77889abed9bf40e6500 100644 (file)
@@ -313,11 +313,10 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
 .linked.vertical {
   > .entry { @extend %linked_vertical; }
 
-  // remove the edge hilight
+  // remove the edge hilight and the focus shadow (unfortunatelly)
   > .entry:not(:last-child) { box-shadow: none; }
-  // add back the focus shadow on focused entries
-  > .entry:focus:not(last-child) { box-shadow: entry_focus_shadow(); }
-
+  // add back the focus shadow
+  > .entry:focus:not(:last-child) { box-shadow: entry_focus_shadow(); }
 
   // brighter border between linked entries
   > .entry:not(:insensitive) + .entry:not(:insensitive) {
@@ -330,13 +329,18 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
   }
 
   // color back the top border of a linked focused entry following another entry and add back the focus shadow.
-  // :not(:only-child) is a specificity bump hack.
-  > .entry:not(:only-child) + .entry:focus {
+  > .entry + .entry:focus:not(:last-child) {
     border-top-color: entry_focus_border();
     box-shadow: entry_focus_shadow();
   }
+  // just recolor the top border on the last focused entry, since we don't reset the shadow here letting that be
+  // inherited by the entry styling.
+  > .entry + .entry:focus:last-child {
+    border-top-color: entry_focus_border();
+  }
 
-  // this takes care of coloring the top border of the focused entry subsequent widget
+  // this takes care of coloring the top border of the focused entry subsequent widget.
+  // :not(:only-child) is a specificity bump hack.
   > .entry:focus:not(:only-child) + .entry,
   > .entry:focus:not(:only-child) + .button,
   > .entry:focus:not(:only-child) + GtkComboBox > .button,
index 4351b155eceb255c26011c3df276258a14b28cf2..08ffc2337c277dfe1bfdeb2c3b3906d328d0ca60 100644 (file)
@@ -296,7 +296,7 @@ GtkTextView {
 
 .linked.vertical > .entry:not(:last-child) {
   box-shadow: none; }
-.linked.vertical > .entry:focus:not(last-child) {
+.linked.vertical > .entry:focus:not(:last-child) {
   box-shadow: inset 0 0 0 1px #215d9c; }
 .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive) {
   border-top-color: #252626;
@@ -304,9 +304,11 @@ GtkTextView {
   .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive):backdrop {
     border-top-color: #272929;
     background-image: linear-gradient(to bottom, #2c2c2c); }
-.linked.vertical > .entry:not(:only-child) + .entry:focus {
+.linked.vertical > .entry + .entry:focus:not(:last-child) {
   border-top-color: #0f2b48;
   box-shadow: inset 0 0 0 1px #215d9c; }
+.linked.vertical > .entry + .entry:focus:last-child {
+  border-top-color: #0f2b48; }
 .linked.vertical > .entry:focus:not(:only-child) + .entry,
 .linked.vertical > .entry:focus:not(:only-child) + .button,
 .linked.vertical > .entry:focus:not(:only-child) + GtkComboBox > .button,
index 817b4db3d88c90b78d845f25757aa8101d256039..052bfd35e6d74d955e8100e890b62d51ba4258ca 100644 (file)
@@ -296,7 +296,7 @@ GtkTextView {
 
 .linked.vertical > .entry:not(:last-child) {
   box-shadow: none; }
-.linked.vertical > .entry:focus:not(last-child) {
+.linked.vertical > .entry:focus:not(:last-child) {
   box-shadow: inset 0 0 0 1px #4a90d9; }
 .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive) {
   border-top-color: #e2e2e2;
@@ -304,9 +304,11 @@ GtkTextView {
   .linked.vertical > .entry:not(:insensitive) + .entry:not(:insensitive):backdrop {
     border-top-color: #e4e4e4;
     background-image: linear-gradient(to bottom, white); }
-.linked.vertical > .entry:not(:only-child) + .entry:focus {
+.linked.vertical > .entry + .entry:focus:not(:last-child) {
   border-top-color: #4a90d9;
   box-shadow: inset 0 0 0 1px #4a90d9; }
+.linked.vertical > .entry + .entry:focus:last-child {
+  border-top-color: #4a90d9; }
 .linked.vertical > .entry:focus:not(:only-child) + .entry,
 .linked.vertical > .entry:focus:not(:only-child) + .button,
 .linked.vertical > .entry:focus:not(:only-child) + GtkComboBox > .button,